package requests

import (
	"WeChatMGRA/modul"
	"errors"
	"fmt"
)


func QuitWx(wid string)error{
	respdata,err:= MakeARequest("logout",[]byte(fmt.Sprintf("{\"wId\":\"%s\"}",wid)))
	if err!=nil{
		return err
	}
	resp := new(modul.SecondLogin_resp)
	msg,err:=VerifyWKResp(respdata,resp)
	if err!=nil{
		return err
	}
	if msg.Code!="1000"{
		return errors.New("发送失败")
	}
	return nil
}